import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:short_drama/pages/mine/model/income_data_model.dart';
import 'package:short_drama/pages/mine/views/earnings_buttons_widget.dart';
import 'package:short_drama/pages/mine/views/earnings_card_widget.dart';
import 'package:short_drama/pages/mine/views/earnings_income_data_widget.dart';
import 'package:short_drama/utils/colors.dart';
import 'package:short_drama/utils/float.dart';

class MineEarningsPage extends StatefulWidget {
  const MineEarningsPage({super.key});

  @override
  _MineEarningsPageState createState() => _MineEarningsPageState();
}

class _MineEarningsPageState extends State<MineEarningsPage> {
  List<IncomeDataModel> list = [
    IncomeDataModel("416", "10-02"),
    IncomeDataModel("336", "10-02"),
    IncomeDataModel("520", "10-02"),
    IncomeDataModel("210", "10-02"),
    IncomeDataModel("416", "10-02"),
    IncomeDataModel("320", "10-02"),
    IncomeDataModel("648", "10-02"),
  ];
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: ClientColors.ff0a0f12,
      appBar: AppBar(
        iconTheme: IconThemeData(color: Colors.white),
        leading: IconButton(
          onPressed: () => {Get.back()},
          icon: Icon(Icons.arrow_back_ios),
        ),
        centerTitle: false,
        titleSpacing: FloatConstance.navBarSpace,
        backgroundColor: ClientColors.odffffff,
        title: Text(
          '我的收益',
          style: TextStyle(color: Colors.white, fontSize: 18),
        ),
      ),
      body: Column(
        children: [
          SizedBox(height: 125, child: EarningsCardWidget()),
          EarningsButtonsWidget().marginOnly(top: 12),
          EarningsIncomeDataWidget(data: list).marginOnly(top: 36),
        ],
      ).paddingOnly(top: 25, left: 16, right: 16),
    );
  }
}
